libxl: Do not trust frontend for disk eject event
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 27 Apr 2016 15:08:49 +0000 (16:08 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:28 +0000 (15:53 +0100)
commite4dccc73a36f06f269c8bdc81fe58f8da9ff43fb
tree6954bb8366189e6a34ee1c777bb5c3df045f3ab1
parentf9a7931b0d268ac57f585d67fc11be7c21f0f9da
libxl: Do not trust frontend for disk eject event

Use the /libxl path for interpreting disk eject watch events: do not
read the backend path out of the frontend.  Instead, use the version
in /libxl.  That avoids us relying on the guest-modifiable
$frontend/backend pointer.

To implement this we store the path
  /libxl/$guest/device/vbd/$devid/backend
in the evgen structure.

This is part of XSA-175.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_internal.h